package com.woniu.order.client;

import com.woniu.order.client.result.CartQueryResultInfo;
import com.woniu.order.client.result.OrderQueryResultInfo;
import com.woniu.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * name是项目名，contextId是client的名字
 */
@FeignClient(contextId = "cartQueryClient", name = "order")
public interface CartQueryClient {

    /**
     * 查看本人购物车
     * @return
     */
    @GetMapping("searchCarts")
    public Result <List<CartQueryResultInfo>> searchCarts(@RequestParam("userId") Integer userId);

}
